import request from '@/utils/request'

// 查询面试题列表
export function listQuestion(query) {
  return request({
    // url: '/system/Question/list',
    url: '/questions/list',
    method: 'get',
    params: query
  })
}

// 根据面试题id查询面试题列表
export function idlistQuestion(query) {
    return request({
      // url: '/system/Question/list',
      url: '/questions/listByTypeId',
      method: 'get',
      params: query
    })
  }

// 获取面试题详细
export function getQuestion(id) {
  return request({
    // url: '/system/Question/' + id,
    url: '/questions/' + id,
    method: 'get'
  })
}

// 新增面试题
export function addQuestion(data) {
  return request({
    // url: '/questions/Question',
    url: '/questions',
    method: 'post',
    data: data
  })
}

// 修改面试题
export function updateQuestion(data) {
  return request({
    // url: '/system/Question',
    url: '/questions',
    method: 'put',
    data: data
  })
}

// 删除面试题
export function delQuestion(ids) {
  return request({
    // url: '/system/Question/' + id,
    url: '/questions/' + ids,
    method: 'delete'
  })
}

// 导出面试题
export function exportQuestion(query) {
  return request({
    // url: '/system/Question/export',
    url: '/questions/export',
    method: 'get',
    params: query
  })
}